package com.sservice.model.dao;

import com.sservice.model.entity.OfferVars;

import java.util.List;

public interface OfferVarsMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(OfferVars record);

    int insertSelective(OfferVars record);

    OfferVars selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(OfferVars record);

    int updateByPrimaryKey(OfferVars record);

    /**
     * 批量增加
     *
     * @param record
     * @return
     */
    int addBatch(List<OfferVars> record);

    /**
     * 根据商品id查找
     *
     * @param record
     * @return
     */
    List<OfferVars> selectBy(OfferVars record);

    /**
     * 根据规格组合ID和商品ID查找规格组合
     *
     * @param record
     * @return
     */
    OfferVars selectOneBy(OfferVars record);

    /**
     * 根据商品Id删除
     *
     * @param offerId
     * @return
     */
    int deleteBatch(int offerId);
}